<div class="media topic-item">
  <div class="media-left media-middle">
    {{ web_macro.user_avatar(author, 'pull-left', 'avatar-sm', true)}}
  </div>
  <div class="media-body">
    <div class="title">
      {% if thread.type == 'question'%}
        <i class="es-icon es-icon-help color-danger" data-toggle="tooltip" data-placement="top" title="问答"></i>
      {% endif %}
      {% if thread.type == 'event'%}
        <i class="es-icon es-icon-locationcircle color-primary" data-toggle="tooltip" data-placement="top" title="活动"></i>
      {% endif %}
      
      {% if thread.type == 'discussion' %}   
        <i class="es-icon es-icon-chatcircle color-info" data-toggle="tooltip" data-placement="top" title="话题"></i>
      {% endif %}
      <a  href="{{ path(target.type ~ '_thread_show', {(target.type ~ 'Id'): target.id, threadId:thread.id}) }}">{{ thread.title }}
      </a>
      
      {% if thread.sticky %}
        <span class="label label-primary" title="置顶帖">置顶</span>
      {% endif %}
      {% if thread.nice %}
        <span class="label label-danger" title="精华帖">精华</span>
      {% endif %}
    </div>
    
    <div class="metas">
      <a href="{{ path('user_show', {id:author.id}) }}">{{ author.nickname }}</a>
      <span>发起了{{ dict_text('threadType', thread.type) }}</span>
      {% if thread.postNum > 0 %}
        {% set poster = users[thread.lastPostUserId] %}
        •
        <span>最后回复 {{ web_macro.user_link(poster, 'link-muted') }}</span>
      {% endif %}
      
      • <span>{{ thread.lastPostTime|smart_time }}</span>
    </div>
  </div>
  <div class="media-data hidden-xs">
    <span>{{ thread.postNum }}<br>回复</span>
    <span>{{ thread.hitNum }}<br>浏览</span>
  </div>
</div>